package com.jet.chat.service;
import java.io.BufferedReader;
import java.io.IOException;

import com.jet.chat.exception.ChatExceptionMessageRead;


public class ChatMessage {
	private String message;
	
	public ChatMessage(BufferedReader reader) throws ChatExceptionMessageRead {
		try {
			this.message = reader.readLine();
		} catch (IOException e) {
			throw new ChatExceptionMessageRead("broken reader");
			//e.printStackTrace();
		}
	}
	
	public ChatMessage(String message) {
		this.message = message;
	}

	public String getMessage() {
		return message;
	}

}
